package com.bifang.module.file.common.enums;

/**
 * 其他类型文件
 *
 * @author chenzh
 * @date 2019-08-12
 */
public enum RelationshipTypeEnum {
    type1("1", "缩略图"),
    type2("2", "水印图"),
    type3("3", "高清原图"),
    type4("4", "原尺寸压缩图片"),
    type99("99", "其他");
    private String type;
    private String name;

    RelationshipTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public static RelationshipTypeEnum getByType(String type) {

        for (RelationshipTypeEnum typeEnum : values()) {
            if (typeEnum.getType() == type) {
                return typeEnum;
            }
        }
        return null;
    }
}
